package fr.afcepf.atod21.brigade.business;

import java.util.List;

import fr.afcepf.atod21.brigade.business.interfaces.InterventionBusiness;
import fr.afcepf.atod21.brigade.dao.BasicDao;
import fr.afcepf.atod21.brigade.daoImpl.InterventionDaoJpa;
import fr.afcepf.atod21.brigade.entity.Intervention;

public class InterventionBusinessImpl implements InterventionBusiness {
	
	private BasicDao<Intervention> daoIntervention;
	
	public void setDaoIntervention(BasicDao<Intervention> daoIntervention) {
		this.daoIntervention = daoIntervention;
	}

	@Override
	public List<Intervention> findAllByReve(int idReve) {
		return  ((InterventionDaoJpa) daoIntervention).findAllByReve(idReve);
	}

	@Override
	public Intervention find(int id) {
		return daoIntervention.read(id);
	}

	@Override
	public List<Intervention> findAll() {
		return daoIntervention.findAll();
	}
}
